package cn.jimjim.framework.code.generator.common.model;

import javax.persistence.Column;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author jim
 * @date 2019-03-13
 */
public class BaseModel<T extends BaseModel<T>> implements Serializable {

    /**
     * 主键
     */
    @Column(name = "id")
    private Long id;
    /**
     * 创建人ID
     */
    @Column(name = "creator")
    private String creator;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private LocalDateTime createTime;
    /**
     * 修改人ID
     */
    @Column(name = "updater")
    private String updater;
    /**
     * 修改时间
     */
    @Column(name = "update_time")
    private LocalDateTime updateTime;
    /**
     * 逻辑删除标识
     */
    @Column(name = "is_deleted")
    private Boolean deleted;
    /**
     * 乐观锁
     */
    @Column(name = "version")
    private Integer version;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
